﻿using System;
using System.ComponentModel.DataAnnotations;
using IterationLife.FootballTeaching.Enums;
using Util.Domains.Repositories;

namespace IterationLife.FootballTeaching.Queries
{
    /// <summary>
    /// 课程查询实体
    /// </summary>
    public class CourseQuery : QueryEntityBase
    {
        /// <summary>
        /// 课程编号
        /// </summary>
        [Display(Name = "课程编号")]
        public Guid? CourseId { get; set; }

        private string _courseCategories = string.Empty;
        /// <summary>
        /// 课程分类集合
        /// </summary>
        [Display(Name = "课程分类集合")]
        public string CourseCategories
        {
            get { return _courseCategories == null ? string.Empty : _courseCategories.Trim(); }
            set { _courseCategories = value; }
        }

        private string _playerPositions = string.Empty;
        /// <summary>
        /// 球员位置集合
        /// </summary>
        [Display(Name = "球员位置集合")]
        public string PlayerPositions
        {
            get { return _playerPositions == null ? string.Empty : _playerPositions.Trim(); }
            set { _playerPositions = value; }
        }

        private string _name = string.Empty;
        /// <summary>
        /// 名称
        /// </summary>
        [Display(Name = "名称")]
        public string Name
        {
            get { return _name == null ? string.Empty : _name.Trim(); }
            set { _name = value; }
        }

        private string _banner = string.Empty;
        /// <summary>
        /// 封面图
        /// </summary>
        [Display(Name = "封面图")]
        public string Banner
        {
            get { return _banner == null ? string.Empty : _banner.Trim(); }
            set { _banner = value; }
        }
        /// <summary>
        /// 难度
        /// </summary>
        [Display(Name = "难度")]
        public DifficultyType? Difficulty { get; set; }
        /// <summary>
        /// 动作数
        /// </summary>
        [Display(Name = "动作数")]
        public int? ActionNumber { get; set; }
        /// <summary>
        /// 参与人数
        /// </summary>
        [Display(Name = "参与人数")]
        public long? ParticipationNumber { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        [Display(Name = "排序号")]
        public int? SortId { get; set; }
        /// <summary>
        /// 起始创建时间
        /// </summary>
        [Display(Name = "起始创建时间")]
        public DateTime? BeginCreationTime { get; set; }
        /// <summary>
        /// 结束创建时间
        /// </summary>
        [Display(Name = "结束创建时间")]
        public DateTime? EndCreationTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name = "创建人")]
        public Guid? CreatorId { get; set; }
        /// <summary>
        /// 起始最后修改时间
        /// </summary>
        [Display(Name = "起始最后修改时间")]
        public DateTime? BeginLastModificationTime { get; set; }
        /// <summary>
        /// 结束最后修改时间
        /// </summary>
        [Display(Name = "结束最后修改时间")]
        public DateTime? EndLastModificationTime { get; set; }
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display(Name = "最后修改人")]
        public Guid? LastModifierId { get; set; }

        /// <summary>
        /// 添加描述
        /// </summary>
        protected override void AddDescriptions()
        {
            base.AddDescriptions();
            AddDescription("课程编号", CourseId);
            AddDescription("课程分类集合", CourseCategories);
            AddDescription("球员位置集合", PlayerPositions);
            AddDescription("名称", Name);
            AddDescription("封面图", Banner);
            AddDescription("难度", Difficulty);
            AddDescription("动作数", ActionNumber);
            AddDescription("参与人数", ParticipationNumber);
            AddDescription("排序号", SortId);
            AddDescription("起始创建时间", BeginCreationTime);
            AddDescription("结束创建时间", EndCreationTime);
            AddDescription("创建人", CreatorId);
            AddDescription("起始最后修改时间", BeginLastModificationTime);
            AddDescription("结束最后修改时间", EndLastModificationTime);
            AddDescription("最后修改人", LastModifierId);
        }
    }
}
